import {LoginConfig, RegisterConfig} from "./request";
import {GET, POST} from "@/apis";


export const login = (userInfo:LoginConfig) => POST<string>({
    url: "/user/login",
    data: userInfo
})

export const register = (userInfo:RegisterConfig) => POST({
    url: `/user/register`,
    data: userInfo
})

export const sendEmailCode = (email:string) => GET(`/user/code?email=${email}`)

export const logout = () => POST("/user/logout")


